<?php

require_once dirname(__FILE__) . '/../lib/tournament_teamGeneratorConfiguration.class.php';
require_once dirname(__FILE__) . '/../lib/tournament_teamGeneratorHelper.class.php';

/**
 * tournament_team actions.
 *
 * @package    ingenyo
 * @subpackage tournament_team
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class tournament_teamActions extends autoTournament_teamActions
{
  public function executeAddTeam(sfWebRequest $request)
  {
    $this->tournamentTeam = TournamentTeamPeer::doSelectOneByTournament($request->getParameter('tournament_id'));
    #si no existe ninguno
    if (!$this->tournamentTeam)
    {

      $this->tournamentTeam = new TournamentTeam();
      $this->tournamentTeam->setTournamentId($request->getParameter('tournament_id'));
    }
    $this->form = new TournamentTeamForm($this->tournamentTeam);
    $this->setTemplate('new');

  }

}
